Skip to content

Retry the PyPI lookup in the version check - #467

Open
lelia wants to merge 1 commit into
mainfrom
lelia/version-check-pypi-retry
Open

lelia wants to merge 1 commit into
mainfrom
lelia/version-check-pypi-retry

Conversation

@lelia

@lelia lelia commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

The required check_version job read the latest release from PyPI with one urlopen call and no timeout. A single dropped connection (URLError: [SSL: UNEXPECTED_EOF_WHILE_READING]) failed it on a recent PR, which blocks the merge until someone reruns the job. The rerun passed with no code change.

Changes

  • version-check.yml: the PyPI request has a 15 s timeout and is retried up to four times, with 2, 4 and 8 s pauses, on connection and SSL errors, timeouts, responses cut off mid-read, and HTTP 5xx.
  • If every attempt fails, or PyPI returns a 4xx, the job fails with a message that names PyPI and says the PR's version isn't the problem, instead of a traceback.
  • The version comparisons after the request are unchanged.
  • Quotes $GITHUB_ENV on the two lines actionlint's shellcheck pass flagged.

Notes

  • No CHANGELOG entry or version bump. The change is CI-only, and the earlier version-check.yml changes (Normalize Slack issue severity and bump SDK to v3.6.0 #331, Log why a new repository couldn't be created #436) didn't add one. The PR rides main's unreleased 2.13.3.
  • Checked with actionlint (clean), and by running the extracted script against PyPI and against mocked SSL EOF, 503, read timeout, remote disconnect, incomplete read, repeated failure and 404 responses.
  • The Manage PR Comment step still posts "Please increment..." whenever this job fails, including on a PyPI failure. The job log gives the real reason.

check_version read the latest release from PyPI with one request and no
timeout, so a single dropped connection failed a required check and
blocked the merge until someone reran the job.

The request now has a 15 s timeout and is retried up to four times, with
2, 4 and 8 s pauses, on connection errors, timeouts and 5xx responses. If
PyPI still can't be read, the job fails with a message that names PyPI and
says the PR's version isn't the problem. The version comparison is
unchanged.

Also quotes $GITHUB_ENV, which actionlint's shellcheck pass flagged.
@lelia
lelia requested a review from a team as a code owner November 24, 2026 03:33
@cursor

cursor Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
CI-only workflow change with no impact on application code, auth, or releases.

Overview
Hardens the version check CI job’s PyPI lookup so transient outages don’t look like a bad version bump. The one-shot urlopen is replaced with a 15s timeout, up to four retries with exponential backoff on network/SSL/timeouts, truncated reads, and 5xx responses; 4xx and exhausted retries exit with explicit messages that the failure is PyPI/network, not the PR version. The two GITHUB_ENV appends are quoted for shellcheck. Version comparison logic after a successful fetch is unchanged.

Reviewed by Cursor Bugbot for commit bb504ef. Configure here.

@lelia

lelia commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit bb504ef. Configure here.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant